<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            button{
                margin-left: 399px;
                width: 100px;
                height: 50px;
            }
            h1,h2,h3{
                text-align: center;
            }
        </style>
    </head>
    <body>
        <button id="start">点击开始</button>
        <button id="end">点击结束</button>
        <h1 id="t1">一等奖</h1>
        <h2 id="t2">二等奖</h2>
        <h3 id="t3">三等奖</h3>
        <script>
            var a=document.getElementById('start');
            var b=document.getElementById('end');
            var c=document.getElementById('t1');
            var d=document.getElementById('t2');
            var e=document.getElementById('t3');
            var timer;
            a.onclick=function(){
                clearInterval(timer);
                timer=setInterval(function(){
                    c.innerHTML=parseInt(Math.random()*11)
                    d.innerHTML=parseInt(Math.random()*11)
                    e.innerHTML=parseInt(Math.random()*11)
                },100)
            }
            b.onclick=function(){
                clearInterval(timer)
                c.innerHTML=parseInt(10)
            }
        </script>
    </body>
</html>